package com.yue.se.event.spring_event;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 功能描述: TODO <br/>
 * 创建时间: 2016/8/1<br/>
 *
 * @author QiuYang
 */
public class SpringTest {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
        EmailEvent emailEvent = new EmailEvent("hello", "abc@163.com", "this is a test");
        context.publishEvent(emailEvent);    // 抛出事件， 相当于事件源

        System.out.println("的吗西亚");
    }
}
